<%@ page contentType="text/html; charset=UTF-8" %>
<%@ page import="client.*" %>
<%@ include file="common.jsp" %>

<%
   
   String startDate = request.getParameter("startDate").trim();
   String endDate = request.getParameter("endDate").trim();
   String tableName = request.getParameter("tableName").trim();
  
 try{  
   if(tableName.equals("t_out_head")||tableName.equals("t_out_sub")){
       System.out.println("1111");
      
           System.out.println("222");
           String actionName = "SubmitOutWh";
           String dataName = "OutWh";
           // 传输xml to 荣爱
           boolean rs =  XMLSend.getInstance().submitOutWhSendXML(actionName, dataName,startDate,endDate);
           
           if(!rs){
            response.sendRedirect("error.jsp");
           }else
               response.sendRedirect("success.jsp"); 
       }
   
/**  if(tableName.equals("t_in_head")||tableName.equals("t_in_sub")){
       if (XMLSend.getInstance().isToRong()) {
           String actionName = "SubmitInWh";
           String dataName = "InWh";
           // 传输xml to 荣爱
           boolean rs = XMLSend.getInstance().submitInWhSendXML(actionName, dataName, startDate,endDate);
           if(!rs){
               response.sendRedirect("error.jsp");
              }else
                  response.sendRedirect("success.jsp");

       }
   }*/
} catch (Exception e) {
   e.printStackTrace();
} 


%>
